package com.ymatou.iapi.dglogin.parameter;

public enum AccessSourceEnum {

    WXAPP(0, "微信小程序"),

    WXH5(1, "微信H5"),

    OTHER(3, "其他"),

    ALIPAY(4, "支付宝小程序"),

    DY(5, "抖音小程序"),

    TouTiao(6, "头条小程序"),

            ;


    private int code;
    private String message;

    public int getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }

    private AccessSourceEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static AccessSourceEnum parse(int code){
        for (AccessSourceEnum platformEnum : AccessSourceEnum.values()) {
            if(platformEnum.getCode() == code){
                return platformEnum;
            }
        }
        return null;
    }
}
